package cn.wolfcode.trip.app.util;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * swagger的配置对象
 */
@Configuration
@EnableSwagger2
public class SwaggerConfig {

	/**
	 * 把一个Docker交给spring管理
	 * Docket：springfox提供的文档的配置对象；
	 *
	 * @return
	 */
	@Bean
	public Docket api() {
		return new Docket(DocumentationType.SWAGGER_2).select().build();
	}
}